package com.demo.springboot;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DogConfig {

    // 2.自定义初始化和销毁methods
    @Bean(initMethod = "init", destroyMethod = "destroy")
    public Dog createDog() {
        return new Dog();
    }

}
